package com.zjxu.fair.home;

import androidx.appcompat.app.AppCompatActivity;

import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import com.zjxu.fair.R;

public class PostCommodityActivity extends AppCompatActivity {
    public Button button;
    public EditText et;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_post_commodity);
        button = findViewById(R.id.btn_publish_post);
        et = findViewById(R.id.post_content);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if ("".equals(et.getText().toString())){
                    Toast.makeText(getApplicationContext(), "内容不能为空！", Toast.LENGTH_SHORT).show();
                }
            }
        });
    }
}